package com.bit.springblogdemo.pojo.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class BlogInfoResponse {
    private Integer id;
    private String title;
    private String content;//文章内容
    private Integer userId;
    @JsonFormat(pattern = "yyyy年MM月dd日 HH点mm分ss秒") //转时间的数据格式
    private LocalDateTime createTime;

    /*public String getContent() {
        return content==null?"":content.substring(0,50);
    }*/
}
